<?php 
/*
	Template Name: The Home
*/
?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">
	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

	<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>

	<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats please -->
  
	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/style-home.css" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
	<?php wp_head(); ?>
</head>

<body id="home">

<?php //query_posts('pagename=home') ?>
<?php query_posts('showposts=1&category_name=copertina'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>


<?php  
	//Recupero dei campi personalizzati dell'articolo
	//Recupero l'immagine dal campo personalizzato
	$info_articolo = array();
	$info_articolo['copertina'] = get_meta('copertina');
	$info_articolo['locandina'] = get_meta('locandina');
	$info_articolo['flickr_tag'] = get_meta('flickr_tag');
	$info_articolo['incontro'] = get_meta('incontro');
	$info_articolo['fotografie'] = get_meta('foto');
	$info_articolo['email'] = get_meta('email_ref');
	$info_articolo['video'] = get_meta('video');

?>


<div id="page">
	<div id="row1">
	    <div class="col-sx left">
        	<div class="shadow-box">
                <div id="box-bk">
                	<div id="logo">
                    <img src="<?php bloginfo('template_directory'); ?>/images/logo.png" alt="logo backstageweb.it" />
                    </div>
                    <p id="p-iva">
                    P.I: 968859848441<br />
                    Piazza Arringo - Ascoli Piceno, IT </p>
                    <ul class="fix-ul">
                    	<li id="mmhhhh" class="left"><span id="anno"><?php the_time(Y);?></span><span id="mese"><?php the_time(F); ?></span></li>
                    	<li id="giorno" class="right"><?php the_time(d);?></li>
                    </ul>
                    
                    <ul class="fix-ul">
                    	<li id="contatti" class="left"><a class="feed" href="<?php bloginfo('rss2_url'); ?>" title="iscriviti al feed"></a><a class="mail" href="<?php bloginfo('url'); ?>/contatti" title="invia una mail"></a></li>
                       
                      <li id="entra" class="right"><a href="<?php bloginfo('url'); ?>/index" title="entra">ENTRA</a></li>
                  </ul>
					
<!--                    	<p id="direttore">Diretto da: <a href="#">Nome Cognome</a></p>
-->                                    
                </div>
            </div>
        </div>
        <div class="col-dx right">
        	<div class="shadow-big">
                <div id="photo-home">
                    <img width="625" height="415" class="photo" src="<?php echo $info_articolo['copertina']; ?>" alt=" Copertina di &quot;<?php the_title(); ?>&quot;" />
                    <img class="grid" src="<?php bloginfo('template_directory'); ?>/images/griglia_03.gif" alt="griglia photo" />
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <div id="row2">
	    <div class="col-sx left">
              <ul id="social">
              	<li><a class="delicious" href="#" title="delicious"></a></li>
              	<li><a class="twitter" href="#" title="twitter"></a></li>
               	<li><a class="facebook" href="#" title="facebook"></a></li>
              	<li><a class="vimeo" href="#" title="vimeo"></a></li>
              	<li><a class="flickr" href="#" title="flickr"></a></li>
              	<li><a class="digg" href="#" title="digg"></a></li>
              	<li><a class="thecnorati" href="#" title="thecnorati"></a></li>
              	<li><a class="youtube" href="#" title="youtube"></a></li>

              </ul>
      </div>
        <div id="titoli" class="col-dx left">
        	<h1><a href="<?php bloginfo('url'); ?>/index" title="Continua a sfogliare '<?php the_title(); ?>'  "><?php the_title(); ?></a></h1>
          <h2><?php the_excerpt(); ?></h2>
            <div id="comments">
            	<span>commenti</span>
                <a href="#"><?php comments_number('0', '1', '%'); ?></a>
              </div>
                <ul class="info">
                    <li>Incontro di: <span><?php echo $info_articolo['incontro']; ?></span></li>
                    <li>Fotografie: <span><?php echo $info_articolo['fotografie']; ?></span></li>
                    <li>Email Reference: <a href="mailto:<?php echo $info_articolo['email']; ?>"><?php echo $info_articolo['email']; ?></a></li>
                </ul>
        </div>
    </div>
    <?php endwhile; endif; ?>
    <div id="footer">
    </div>

</div>

</body>
</html>
